<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="">
	<meta http-equiv="description" content="This is my page">
	
  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<table width="500px">
    			<tr>
    				<td>
			    		<s:radio list='#{"director":"董事", "manager":"经理"}' name="role"></s:radio>
			    		<input type="checkbox" name="c1" value="1" checked="checked"/>一
			    		<input type="checkbox" name="c1" value="2"/>二
						<input type="button" id="btn1" value="click" onclick="testScript()" />
						<textarea name="txt1" disabled="disabled">hello</textarea>
    				</td>
    			</tr>
    		</table>
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function testScript()
    {
    	var input = $('input:checkbox[name="c1"]');
    	var len = input.length;
    	for(var i = 0; i < len; i++)
    	{
    		var cx = $(input.get(i));
    		cx.wrap('<div id="div'+i+'" style="display:inline-block;"></div>');
    		var divx = $('#div'+i);
    		if(cx.attr('checked'))
    		{
    			divx.append('checked');
    		}
    		divx.append('&nbsp;&nbsp;');
    		cx.css('display', 'none');
    	}
    }
    </script>
  </body>
</html>
